const path = require("path");
function resolve(dir) {
  return path.join(__dirname, dir);
}
module.exports = {
  publicPath: "./",
  devServer: {
    host: "0.0.0.0",
    port: 8888,
    https: false, // https:{type:Boolean}
    open: true,
    disableHostCheck: true //webpack4.0 开启热更新
  },
  chainWebpack: config => {
    config.resolve.alias
      .set("@", resolve("src")) // 设置别名，key,value自行定义，比如.set('@@', resolve('src/components'))
      .set("_c", resolve("src/components"));
    // config
    // .plugin('webpack-bundle-analyzer')
    // .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
  },
  // 设为false打包时不生成.map文件
  productionSourceMap: false,
  lintOnSave: false
};
